//
//  CollectionViewCell.swift
//  XMenSwift
//
//  Created by X-MEN on 2022/4/15.
//

import UIKit

class LabelCollectionViewCell: UICollectionViewCell {
    lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.textColor = .black
        label.font = .systemFont(ofSize: 14)
        label.numberOfLines = 1
        label.text = "标题"
        label.textAlignment = NSTextAlignment.center
        return label
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        configUi()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func configUi() {
        let view = UIView.init()
        view.backgroundColor = UIColor.blue
        viewRadiusWithBorderWidthForColor(view, 6.0, 1, UIColor.red)
        self.contentView.addSubview(view)
        view.snp.makeConstraints { make  in
            make.top.right.bottom.left.equalToSuperview()
        }
        
        view.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make  in
            make.top.right.bottom.left.equalToSuperview()
        }
        
    }
}
